<template>
  <div class="mod-config">
    <el-form  :model="dataForm" @keyup.enter.native="getSearchDataList()" label-width="100px">
      <el-card style="width: 100%;" shadow="hover">
        <div slot="header" class="clearfix">
          <span>查询条件</span>
          <el-button @click="show3 = !show3" style="float: right; padding: 3px 0" type="text">更多条件</el-button> 
        </div>
        <div>
          <el-row >
            <el-col :span="8">
              <el-form-item label="本人状态" prop="myStatus">
              <el-select v-model="dataForm.myStatus" placeholder="本人状态"  clearable @click.native="dataSex('BRZT')" :style="{ width: '60%' }">
                <el-option
                  v-for="item in myStatusList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
              </el-form-item>
            </el-col>
            <div>
            <el-col :span="8">
              <el-form-item label="姓名" prop="name">
              <el-select v-model="dataForm.name" filterable placeholder="姓名检索"  remote clearable :remote-method="filterMethod" :style="{ width: '60%' }">
                <el-option
                  v-for="item in nameList"
                  :key="item.id"
                  :label="item.name"
                  :value="item.name">
                </el-option>
              </el-select>  
              </el-form-item>     
            </el-col>
            </div>
            <el-col :span="8">
              <el-form-item label="原部队" prop="originalTroops">
              <el-select v-model="dataForm.originalTroops" placeholder="原部队"  clearable @click.native="dataSex('YBD')" :style="{ width: '60%' }">
                <el-option
                  v-for="item in originalTroopsList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>    
              </el-form-item>   
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="身份证号" prop="idNo">
                  <el-input v-model="dataForm.idNo" placeholder="身份证号"  :style="{ width: '60%' }" clearable></el-input>
              </el-form-item>     
            </el-col>
            <el-col :span="8">
              <el-form-item label="安置区县" prop="county">
              <el-select v-model="dataForm.county" placeholder="安置区县"  clearable @change="dataArea($event,'AREA')" :style="{ width: '60%' }">
                <el-option
                  v-for="item in countyList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>   
              </el-form-item>    
            </el-col>
            <el-col :span="8">
              <el-form-item label="街道名称" prop="street">
              <el-select v-model="dataForm.street" filterable placeholder="街道名称"  :style="{ width: '60%' }" clearable >
                <el-option
                  v-for="item in streetList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>  
              </el-form-item>     
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="8">
              <el-form-item label="身份" prop="retirementStatus">
              <el-select v-model="dataForm.retirementStatus" placeholder="身份"  clearable  @change="dataArea($event, 'TXQSF')" :style="{ width: '60%' }">
                <el-option
                  v-for="item in retirementStatusList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>  
              </el-form-item>     
            </el-col>
            <el-col :span="8">
              <el-form-item label="职务" prop="duties">
              <el-select v-model="dataForm.duties" placeholder="职务"   :style="{ width: '60%' }" clearable>
                <el-option
                  v-for="item in dutiesList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>   
              </el-form-item>    
            </el-col>
            <el-col :span="8">
              <el-form-item label="人员分类" prop="personType">
              <el-select v-model="dataForm.personType" filterable placeholder="人员分类"  clearable :style="{ width: '60%' }" >
                <el-option
                  v-for="item in personTypeList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>  
              </el-form-item>     
            </el-col>
          </el-row>
          <div>
            <el-collapse-transition>
              <div v-show="show3">
                <div >
                  <el-row >
                    <el-col :span="12">
                    <el-form-item label="出生年月">
                      <el-col :span="11">
                        <el-date-picker type="date" placeholder="选择日期" v-model="dataForm.birthDate1" value-format="yyyy-MM-dd" :style="{ width: '80%' }"></el-date-picker>
                      </el-col>
                      <el-col class="line" :span="2">-</el-col>
                      <el-col :span="11">
                        <el-date-picker type="date" placeholder="选择日期" v-model="dataForm.birthDate2" value-format="yyyy-MM-dd" :style="{ width: '80%' }"></el-date-picker>
                      </el-col>
                    </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row>
                    <el-col :span="12">
                    <el-form-item label="退休日期">
                      <el-col :span="11">
                        <el-date-picker type="date" placeholder="选择日期" v-model="dataForm.retirementTime1" value-format="yyyy-MM-dd" :style="{ width: '80%' }"></el-date-picker>
                      </el-col>
                      <el-col class="line" :span="2">-</el-col>
                      <el-col :span="11">
                        <el-date-picker type="date" placeholder="选择日期" v-model="dataForm.retirementTime2" value-format="yyyy-MM-dd" :style="{ width: '80%' }"></el-date-picker>
                      </el-col>
                    </el-form-item>
                    </el-col>
                    <el-col :span="12">
                    <el-form-item label="工作时间">
                      <el-col :span="11">
                        <el-date-picker type="date" placeholder="选择日期" v-model="dataForm.workTime1" value-format="yyyy-MM-dd" :style="{ width: '80%' }"></el-date-picker>
                      </el-col>
                      <el-col class="line" :span="2">-</el-col>
                      <el-col :span="11">
                        <el-date-picker type="date" placeholder="选择日期" v-model="dataForm.workTime2" value-format="yyyy-MM-dd" :style="{ width: '80%' }"></el-date-picker>
                      </el-col>
                    </el-form-item>
                    </el-col>  
                  </el-row>
                </div>    
              </div>
            </el-collapse-transition>
          </div>  
        </div>
      </el-card>    
      <el-row style="margin-bottom:12px;margin-top:12px">
        <el-col :span="12">  
            <el-button @click="getSearchDataList()">查询</el-button>
            <el-button @click="getResult()">计算</el-button>
            <el-button v-if="isAuth('jxxm:retiredemployees:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
            <el-button v-if="isAuth('jxxm:retiredemployees:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
        </el-col>
      </el-row>
    </el-form>
    <el-table
      :data="dataList"
      height="592"
      border
      v-loading="dataListLoading"
      @selection-change="selectionChangeHandle"
      style="width: 100%;">
      <el-table-column
        fixed
        type="selection"
        header-align="center"
        align="center"
        width="50">
      </el-table-column>
      <!-- <el-table-column
        prop="id"
        header-align="center"
        align="center"
        label="id">
      </el-table-column> -->
      <el-table-column
        fixed
        prop="areaCode"
        header-align="center"
        align="center"
        label="行政区划代码"
        width="120">
      </el-table-column>
      <el-table-column
        fixed
        prop="personalCode"
        header-align="center"
        align="center"
        label="个人编码"
        width="140">
      </el-table-column>
      <el-table-column
        fixed
        prop="name"
        header-align="center"
        align="center"
        label="姓名">
      </el-table-column>
       <el-table-column
        prop="sex"
        header-align="center"
        align="center"
        label="性别">
      </el-table-column>
      <el-table-column
        prop="nation"
        header-align="center"
        align="center"
        label="民族">
      </el-table-column>
      <el-table-column
        prop="politicalFace"
        header-align="center"
        align="center"
        label="政治面目"
        width="120">
      </el-table-column>
      <el-table-column
        prop="idNo"
        header-align="center"
        align="center"
        label="身份证号码"
        width="180">
      </el-table-column>
      <el-table-column
        prop="birthDate"
        header-align="center"
        align="center"
        label="出生年月"
        format="yyyy 年 MM 月 dd 日"
        width="120">
      </el-table-column>
      <el-table-column
        prop="workTime"
        header-align="center"
        align="center"
        label="参加工作时间"
        width="120">
      </el-table-column>
      <el-table-column
        prop="retirementTime"
        header-align="center"
        align="center"
        label="退休时间"
        width="120">
      </el-table-column>
      <el-table-column
        prop="personType"
        header-align="center"
        align="center"
        label="人员分类"
        width="120">
      </el-table-column>
      <el-table-column
        prop="retirementStatus"
        header-align="center"
        align="center"
        label="退休前身份"
        width="180">
      </el-table-column>
      <el-table-column
        prop="duties"
        header-align="center"
        align="center"
        label="职务"
        width="140">
      </el-table-column>
      <el-table-column
        prop="county"
        header-align="center"
        align="center"
        label="所属区县"
        width="140">
      </el-table-column>
      <!-- <el-table-column
        prop="death"
        header-align="center"
        align="center"
        :formatter="groupFormate"
        label="死亡">
      </el-table-column> -->
      <el-table-column
        prop="street"
        header-align="center"
        align="center"
        label="所属街道"
        width="140">
      </el-table-column>
      <el-table-column
        prop="community"
        header-align="center"
        align="center"
        label="居住社区"
        width="140">
      </el-table-column>
      <el-table-column
        prop="originalTroops"
        header-align="center"
        align="center"
        label="原部队"
        width="140">
      </el-table-column>
      <el-table-column
        prop="handoverPeriod"
        header-align="center"
        align="center"
        label="移交时间段"
        width="140">
      </el-table-column>
      <el-table-column
        prop="handoverTime"
        header-align="center"
        align="center"
        label="移交时间"
        width="140">
      </el-table-column>
      <el-table-column
        prop="handoverMode"
        header-align="center"
        align="center"
        label="移交方式"
        width="140">
      </el-table-column>
      <el-table-column
        prop="handoverBatch"
        header-align="center"
        align="center"
        label="移交批次"
        width="140">
      </el-table-column>
      <el-table-column
        prop="workersClassification"
        header-align="center"
        align="center"
        label="职工分类"
        width="140">
      </el-table-column>
      <el-table-column
        prop="reception"
        header-align="center"
        align="center"
        label="接收情况"
        width="140">
      </el-table-column>
      <el-table-column
        prop="myStatus"
        header-align="center"
        align="center"
        label="本人状态"
        width="140">
      </el-table-column>
      <el-table-column
        prop="inOutTime"
        header-align="center"
        align="center"
        label="转入转出时间"
        width="140">
      </el-table-column>
      <el-table-column
        prop="deathTime"
        header-align="center"
        align="center"
        label="死亡时间"
        width="140">
      </el-table-column>
      <el-table-column
        prop="housingSituation"
        header-align="center"
        align="center"
        label="住房情况"
        width="140">
      </el-table-column>
      <el-table-column
        prop="housingPropertyRight"
        header-align="center"
        align="center"
        label="住房房产权"
        width="140">
      </el-table-column>
      <el-table-column
        prop="leaseholder"
        header-align="center"
        align="center"
        label="租赁人"
        width="140">
      </el-table-column>
      <el-table-column
        prop="housingArea"
        header-align="center"
        align="center"
        label="住房建筑面积"
        width="120">
      </el-table-column>
      <el-table-column
        prop="increasePension"
        header-align="center"
        align="center"
        label="增加退休金"
        width="120">
      </el-table-column>
      <el-table-column
        prop="totalMonthlyPension"
        header-align="center"
        align="center"
        label="本年度月退休金总额"
        width="150">
      </el-table-column>
      <el-table-column
        prop="death"
        header-align="center"
        align="center"
        :formatter="groupFormate"
        label="死亡">
      </el-table-column>
      <el-table-column
        prop="workUnit"
        header-align="center"
        align="center"
        label="工作单位"
        width="300">
      </el-table-column>
      <el-table-column
        prop="address"
        header-align="center"
        align="center"
        label="家庭住址"
        width="300">
      </el-table-column>
      <el-table-column
        prop="phone"
        header-align="center"
        align="center"
        label="电话号码"
        width="300">
      </el-table-column>
      <el-table-column
        prop="remarks"
        header-align="center"
        align="center"
        label="备注"
        width="300">
      </el-table-column>
      <el-table-column
        prop="workingYears"
        header-align="center"
        align="center"
        label="工作年限">
      </el-table-column>
      <el-table-column
        prop="yuYue"
        header-align="center"
        align="center"
        label="工龄余月">
      </el-table-column>
      <el-table-column
        prop="workingYearsArmy"
        header-align="center"
        align="center"
        label="在军队工作年限"
        width="120">
      </el-table-column>
      <el-table-column
        prop="teachingAge"
        header-align="center"
        align="center"
        label="教(护)龄">
      </el-table-column>
      <el-table-column
        prop="wageLevel"
        header-align="center"
        align="center"
        label="工资级别"
        width="140">
      </el-table-column>
      <el-table-column
        prop="wageGrade"
        header-align="center"
        align="center"
        label="工资档次"
        width="140">
      </el-table-column>
      <el-table-column
        prop="wageScale"
        header-align="center"
        align="center"
        label="工资等级"
        width="200">
      </el-table-column>
      <el-table-column
        prop="treatmentStandard"
        header-align="center"
        align="center"
        label="待遇标准"
        width="140">
      </el-table-column>
      <el-table-column
        prop="personnelClassification"
        header-align="center"
        align="center"
        label="技术人员分类"
        width="140">
      </el-table-column>
      <el-table-column
        prop="enjoyAllowance"
        header-align="center"
        align="center"
        label="是否享受荣誉津贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="specialAllowance"
        header-align="center"
        align="center"
        label="是否享受政府特殊津贴"
        width="170">
      </el-table-column>
      <el-table-column
        prop="increaseProportion"
        header-align="center"
        align="center"
        label="提高比例">
      </el-table-column>
      <el-table-column
        prop="renson"
        header-align="center"
        align="center"
        label="提高比例原因"
        width="120">
      </el-table-column>
      <el-table-column
        prop="allowanceRatio"
        header-align="center"
        align="center"
        label="奖金津贴比例"
        width="120">
      </el-table-column>
      <el-table-column
        prop="postLevel"
        header-align="center"
        align="center"
        label="岗位级别"
        width="120">
      </el-table-column>
      <el-table-column
        prop="salary"
        header-align="center"
        align="center"
        label="薪级">
      </el-table-column>
      <el-table-column
        prop="isImprove"
        header-align="center"
        align="center"
        label="是否提高">
      </el-table-column>
      <el-table-column
        prop="retirementFeeProportion"
        header-align="center"
        align="center"
        label="基本退休费计发比例"
        width="150">
      </el-table-column>
      <el-table-column
        prop="senioritySalary"
        header-align="center"
        align="center"
        label="工龄工资">
      </el-table-column>
      <el-table-column
        prop="basicSalary"
        header-align="center"
        align="center"
        label="基础工资">
      </el-table-column>
      <el-table-column
        prop="levelSalary"
        header-align="center"
        align="center"
        label="级别工资">
      </el-table-column>
      <el-table-column
        prop="gradeSalary"
        header-align="center"
        align="center"
        label="档次工资">
      </el-table-column>
      <el-table-column
        prop="salaryScale"
        header-align="center"
        align="center"
        label="薪级工资">
      </el-table-column>
      <el-table-column
        prop="bonusAllowance"
        header-align="center"
        align="center"
        label="奖金津贴">
      </el-table-column>
      <el-table-column
        prop="serviceAllowance"
        header-align="center"
        align="center"
        label="军队服务津贴"
        width="120">
      </el-table-column>
      <el-table-column
        prop="seniorityAllowance"
        header-align="center"
        align="center"
        label="教护龄津贴"
        width="100">
      </el-table-column>
      <el-table-column
        prop="totalSubsidy"
        header-align="center"
        align="center"
        label="职务补贴合计"
        width="120">
      </el-table-column>
      <el-table-column
        prop="specialTeacherSubsidy"
        header-align="center"
        align="center"
        label="特级老师补贴"
        width="120">
      </el-table-column>
      <el-table-column
        prop="difficultySubsidy"
        header-align="center"
        align="center"
        label="困难补助">
      </el-table-column>
      <el-table-column
        prop="raiseWages"
        header-align="center"
        align="center"
        label="提高工资10%"
        width="120">
      </el-table-column>
      <el-table-column
        prop="retirementPayEightynine"
        header-align="center"
        align="center"
        label="1989年10月增加退休费"
        width="170">
      </el-table-column>
      <el-table-column
        prop="retirementPayNinetytwo"
        header-align="center"
        align="center"
        label="1992年3月提高退休费10％"
        width="190">
      </el-table-column>
      <el-table-column
        prop="retirementPayFirst"
        header-align="center"
        align="center"
        label="1993年10月第一步增加退休费"
        width="210">
      </el-table-column>
      <el-table-column
        prop="retirementPaySecond"
        header-align="center"
        align="center"
        label="1993年10月第二步增加退休费"
        width="210">
      </el-table-column>
      <el-table-column
        prop="retirementPayNinetyfive"
        header-align="center"
        align="center"
        label="1995年10月增加退休费"
        width="190">
      </el-table-column>
      <el-table-column
        prop="retirementPayNinetyseven"
        header-align="center"
        align="center"
        label="1997年7月增加退休费"
        width="180">
      </el-table-column>
      <el-table-column
        prop="retirementPayNinetysesec"
        header-align="center"
        align="center"
        label="1997年10月增加退休费"
        width="180">
      </el-table-column>
      <el-table-column
        prop="retirementPayNinetynine"
        header-align="center"
        align="center"
        label="1999年7月增加退休费"
        width="180">
      </el-table-column>
      <el-table-column
        prop="retirementPayNinetynisec"
        header-align="center"
        align="center"
        label="1999年10月增加退休费"
        width="180">
      </el-table-column>
      <el-table-column
        prop="retirementPayZero"
        header-align="center"
        align="center"
        label="2000年1月增加退休费"
        width="180">
      </el-table-column>
      <el-table-column
        prop="retirementPayOne"
        header-align="center"
        align="center"
        label="2001年1月增加退休费"
        width="180">
      </el-table-column>
      <el-table-column
        prop="retirementPayOnenew"
        header-align="center"
        align="center"
        label="2001年10月新增退休费"
        width="180">
      </el-table-column>
      <el-table-column
        prop="retirementPayOnsec"
        header-align="center"
        align="center"
        label="2001年10月增加退休费"
        width="180">
      </el-table-column>
      <el-table-column
        prop="retirementPayThird"
        header-align="center"
        align="center"
        label="2003年7月增加退休费"
        width="180">
      </el-table-column>
      <el-table-column
        prop="retirementPayThisec"
        header-align="center"
        align="center"
        label="2003年10月增加退休费"
        width="180">
      </el-table-column>
      <el-table-column
        prop="retirementPayFive"
        header-align="center"
        align="center"
        label="2005年10月增加退休费"
        width="180">
      </el-table-column>
      <el-table-column
        prop="retirementPaySix"
        header-align="center"
        align="center"
        label="2006年7月增加退休费"
        width="180">
      </el-table-column>
      <el-table-column
        prop="foodAllowanceSeventynine"
        header-align="center"
        align="center"
        label="1979年副食补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="foodAllowanceEightyeight"
        header-align="center"
        align="center"
        label="1988年副食补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="oilAllowanceNightyone"
        header-align="center"
        align="center"
        label="1991年粮油补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="oilAllowanceNightytwo"
        header-align="center"
        align="center"
        label="1992年粮油补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="fuelLlowance"
        header-align="center"
        align="center"
        label="1992年燃料补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="meatLlowance"
        header-align="center"
        align="center"
        label="1992年蛋肉菜补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="oilAllowanceNightythird"
        header-align="center"
        align="center"
        label="1993年粮油补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceEightyfive"
        header-align="center"
        align="center"
        label="1985年生活补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceEightyei"
        header-align="center"
        align="center"
        label="1988年生活补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceNightytw"
        header-align="center"
        align="center"
        label="1992年生活补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceNightyfo"
        header-align="center"
        align="center"
        label="1994年生活补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceNightyfive"
        header-align="center"
        align="center"
        label="1995年生活补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceNightysix"
        header-align="center"
        align="center"
        label="1996年增加生活补贴"
        width="160">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceNightysev"
        header-align="center"
        align="center"
        label="1997年增加生活补贴"
        width="160">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceNightyeig"
        header-align="center"
        align="center"
        label="1998年增加生活补贴"
        width="160">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceNightynig"
        header-align="center"
        align="center"
        label="1999年增加生活补贴"
        width="160">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceZero"
        header-align="center"
        align="center"
        label="2000年增加生活补贴"
        width="160">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceOne"
        header-align="center"
        align="center"
        label="2001年增加生活补贴"
        width="160">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceTwo"
        header-align="center"
        align="center"
        label="2002年增加生活补贴"
        width="160">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceThird"
        header-align="center"
        align="center"
        label="2003年增加机制补贴"
        width="160">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceFour"
        header-align="center"
        align="center"
        label="2004年增加机制补贴"
        width="160">
      </el-table-column>
      <el-table-column
        prop="livingAllowanceSeven"
        header-align="center"
        align="center"
        label="2007年增加生活补贴"
        width="160">
      </el-table-column>
      <el-table-column
        prop="specialGoveAllowanc"
        header-align="center"
        align="center"
        label="政府特殊津贴"
        width="120">
      </el-table-column>
      <el-table-column
        prop="paperMoney"
        header-align="center"
        align="center"
        label="书报费">
      </el-table-column>
      <el-table-column
        prop="housingSubsidy"
        header-align="center"
        align="center"
        label="住房补贴">
      </el-table-column>
      <el-table-column
        prop="bathSubsidy"
        header-align="center"
        align="center"
        label="洗理费">
      </el-table-column>
      <el-table-column
        prop="honorAllowance"
        header-align="center"
        align="center"
        label="荣誉津贴">
      </el-table-column>
      <el-table-column
        prop="otherIncome"
        header-align="center"
        align="center"
        label="其它收入">
      </el-table-column>
      <el-table-column
        prop="jobSubsidy"
        header-align="center"
        align="center"
        label="2010年职务补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="ageAllowance"
        header-align="center"
        align="center"
        label="2010年年龄补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="holidaySubsidy"
        header-align="center"
        align="center"
        label="四大节日补贴"
        width="120">
      </el-table-column>
      <el-table-column
        prop="retirementAllowanceOneo"
        header-align="center"
        align="center"
        label="2011年退休补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="growthMechanismSubsidy"
        header-align="center"
        align="center"
        label="2012年增长机制补贴"
        width="160">
      </el-table-column>
      <el-table-column
        prop="workingYearsSubsidy"
        header-align="center"
        align="center"
        label="2012年工作年限补贴"
        width="160">
      </el-table-column>
      <el-table-column
        prop="proportionalSubsidy"
        header-align="center"
        align="center"
        label="2012年提高比例补贴"
        width="160">
      </el-table-column>
      <el-table-column
        prop="retirementAllowanceOneth"
        header-align="center"
        align="center"
        label="2013年退休补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="growthMechanismThirty"
        header-align="center"
        align="center"
        label="2013年增长机制补贴"
        width="160">
      </el-table-column>
      <el-table-column
        prop="retirementAllowanceThirty"
        header-align="center"
        align="center"
        label="2014年退休补贴"
        width="140">
      </el-table-column>
      <el-table-column
        prop="retirementPayFourty"
        header-align="center"
        align="center"
        label="2014年10月增加退休费"
        width="170">
      </el-table-column>
      <el-table-column
        prop="logoutDate"
        header-align="center"
        align="center"
        label="注销日期"
        width="140">
      </el-table-column>
      <el-table-column
        prop="heatingSubsidy"
        header-align="center"
        align="center"
        label="采暖补贴">
      </el-table-column>
      <el-table-column
        prop="serviceSubsidy"
        header-align="center"
        align="center"
        label="物业服务补贴"
        width="120">
      </el-table-column>
      <el-table-column
        prop="pensionSixteen"
        header-align="center"
        align="center"
        label="2016年增加养老金"
        width="140">
      </el-table-column>
      <el-table-column
        prop="pensionSeventeen"
        header-align="center"
        align="center"
        label="2017年增加养老金"
        width="140">
      </el-table-column>
      <el-table-column
        prop="pensionEighteen"
        header-align="center"
        align="center"
        label="2018年增加养老金"
        width="140">
      </el-table-column>
      <el-table-column
        prop="pensionNineteen"
        header-align="center"
        align="center"
        label="2019年增加养老金"
        width="140">
      </el-table-column>
      <el-table-column
        prop="adjustTreatment"
        header-align="center"
        align="center"
        label="2019年1月调整待遇"
        width="150">
      </el-table-column>
      <el-table-column
        prop="basicPension"
        header-align="center"
        align="center"
        label="2019年基本养老金"
        width="140">
      </el-table-column>
      <el-table-column
        prop="pensionTwenty"
        header-align="center"
        align="center"
        label="2020年增加养老金"
        width="140">
      </el-table-column>
      <el-table-column
        prop="pensionTwentyone"
        header-align="center"
        align="center"
        label="2021年增加养老金"
        width="140">
      </el-table-column>
      <el-table-column
        prop="ext1"
        header-align="center"
        align="center"
        label="2022年增加养老金"
        width="140">
      </el-table-column>
      <el-table-column
        fixed="right"
        header-align="center"
        align="center"
        width="150"
        label="操作">
        <template slot-scope="scope">
          <el-button type="text" size="small" @click="editHandle(scope.row.id)">查看</el-button>
          <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
          <el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination
      @size-change="sizeChangeHandle"
      @current-change="currentChangeHandle"
      :current-page="pageIndex"
      :page-sizes="[10, 20, 50, 100]"
      :page-size="pageSize"
      :total="totalPage"
      layout="total, sizes, prev, pager, next, jumper">
    </el-pagination>
    <!-- 弹窗, 新增 / 修改 -->
    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
    <!-- <el-form  label-width="100px" style="margin-top:12px">
       <el-row >
          <el-col :span="6">
            <el-form-item label="人数" >
              <el-input   clearable :style="{ width: '80%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="退休费汇总" >
              <el-input value="123456"  clearable :style="{ width: '80%' }"></el-input>
            </el-form-item>
          </el-col>   
          <el-col :span="6">  
            <el-form-item label="增加退休费汇总" label-width="120px">
              <el-input   clearable :style="{ width: '80%' }"></el-input>
            </el-form-item>
          </el-col>  
          <el-col :span="6">  
            <el-form-item label="平均年龄" >
              <el-input   clearable :style="{ width: '80%' }"></el-input>
            </el-form-item>
          </el-col>  
        </el-row>
    </el-form> -->
  </div>
</template>

<script>
  import AddOrUpdate from './retiredemployees-add-or-update'
  export default {
    data () {
      return {
        show3: false,
        typeOptions:[],
        retirementStatusList: [],
        personTypeList: [],
        myStatusList: [],
        originalTroopsList: [],
        countyList: [],
        streetList: [],
        nameList: [],
        dutiesList: [],
        nameListSpirt: [],
        dataForm: {
          key: '',
          street: '',
          duties:'',
          myStatus:'',
          name:'',
          originalTroops:'',
          retirementStatus:'',
          county:'',
          birthDate1:'',
          birthDate2:'',
          age1:'',
          age2:'',
          retirementTime1:'',
          retirementTime2:'',
          workTime1:'',
          workTime2:'',
          idNo:'',
          duties:'',
          personType:''

        },
        dataList: [],
        pageIndex: 1,
        pageSize: 10,
        totalPage: 0,
        dataListLoading: false,
        dataListSelections: [],
        addOrUpdateVisible: false,
        addOrUpdateVisible1: false,
        options36: [{
          value: '张三',
          label: '张三'
        }, {
          value: '李四',
          label: '李四'
        }, {
          value: '王五',
          label: '王五'
        }, {
          value: '董瑜',
          label: '董瑜'
        }]
      }
    },
    components: {
      AddOrUpdate,
    },
    activated () {
      this.getDataList()
      //this.getName()
    },
    created(){
			this.dataSex('DEATH')
      this.dataSex('TXQSF')
      this.dataSex('BRZT')
      this.dataSex('YBD')
      this.dataSex('AREA')
      this.dataSex('RYFL')
    },

    methods: {
      // 获取数据列表
      getDataList () {
        // alert(this.dataForm.name);
        this.dataListLoading = true
        this.$http({
          url: this.$http.adornUrl('/jxxm/retiredemployees/list'),
          method: 'get',
          params: this.$http.adornParams({
            'page': this.pageIndex,
            'limit': this.pageSize,
            'myStatus': this.dataForm.myStatus,
            'name': this.dataForm.name,
            'originalTroops': this.dataForm.originalTroops,
            'retirementStatus': this.dataForm.retirementStatus,
            'county': this.dataForm.county,
            'street': this.dataForm.street,
            'birthDate1': this.dataForm.birthDate1,
            'birthDate2': this.dataForm.birthDate2,
            'retirementTime1': this.dataForm.retirementTime1,
            'retirementTime2': this.dataForm.retirementTime2,
            'workTime1': this.dataForm.workTime1,
            'workTime2': this.dataForm.workTime2,
            'idNo':this.dataForm.idNo,
            'duties':this.dataForm.duties,
            'personType':this.dataForm.personType
          })
        }).then(({data}) => {
          if (data && data.code === 0) {
            this.dataList = data.page.list
            this.totalPage = data.page.totalCount
          } else {
            this.dataList = []
            this.totalPage = 0
          }
          this.dataListLoading = false
        })
      },

      // 获取查询数据列表
      getSearchDataList () {
        // alert(this.dataForm.name);
        this.dataListLoading = true
        this.$http({
          url: this.$http.adornUrl('/jxxm/retiredemployees/searchList'),
          method: 'get',
          params: this.$http.adornParams({
            'page': 1,
            'limit': 10,
            'myStatus': this.dataForm.myStatus,
            'name': this.dataForm.name,
            'originalTroops': this.dataForm.originalTroops,
            'retirementStatus': this.dataForm.retirementStatus,
            'county': this.dataForm.county,
            'street': this.dataForm.street,
            'birthDate1': this.dataForm.birthDate1,
            'birthDate2': this.dataForm.birthDate2,
            'retirementTime1': this.dataForm.retirementTime1,
            'retirementTime2': this.dataForm.retirementTime2,
            'workTime1': this.dataForm.workTime1,
            'workTime2': this.dataForm.workTime2,
            'idNo':this.dataForm.idNo,
            'duties':this.dataForm.duties,
            'personType':this.dataForm.personType

          })
        }).then(({data}) => {
          if (data && data.code === 0) {
            this.dataList = data.page.list
            this.totalPage = data.page.totalCount
          } else {
            this.dataList = []
            this.totalPage = 0
          }
          this.dataListLoading = false
        })
      },
      // 每页数
      sizeChangeHandle (val) {
        this.pageSize = val
        this.pageIndex = 1
        this.getDataList()
      },
      // 当前页
      currentChangeHandle (val) {
        this.pageIndex = val
        this.getDataList()
      },
      // 多选
      selectionChangeHandle (val) {
        this.dataListSelections = val
      },
      // 查看
      editHandle (id) {
        this.addOrUpdateVisible = true
        this.$nextTick(() => {
          this.$refs.addOrUpdate.viewShow(id)
        })
      },
      // 新增 / 修改
      addOrUpdateHandle (id) {
        this.addOrUpdateVisible = true
        this.$nextTick(() => {
          this.$refs.addOrUpdate.init(id)
        })
      },
      // 删除
      deleteHandle (id) {
        var ids = id ? [id] : this.dataListSelections.map(item => {
          return item.id
        })
        this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.$http({
            url: this.$http.adornUrl('/jxxm/retiredemployees/delete'),
            method: 'post',
            data: this.$http.adornData(ids, false)
          }).then(({data}) => {
            if (data && data.code === 0) {
              this.$message({
                message: '操作成功',
                type: 'success',
                duration: 1500,
                onClose: () => {
                  this.getDataList()
                }
              })
            } else {
              this.$message.error(data.msg)
            }
          })
        })
      },
      // 计算
      getResult () {
          this.$http({
            url: this.$http.adornUrl('/jxxm/retiredemployees/getResult'),
            method: 'post',
            data: this.$http.adornData()
          }).then(({data}) => {
            if (data && data.code === 0) {
              this.$message({
                message: '操作成功',
                type: 'success'
              })
            } else {
              this.$message.error(data.msg)
            }
          })
      },

      dataSex(type){
         this.$http({
            url: this.$http.adornUrl("/sys/dict/select/"+type),
            method: "get",
            params: this.$http.adornParams(),
            })
            .then(({ data }) => {
              if(type == 'DEATH'){
                this.typeOptions = data && data.code === 0 ? data.list : [];
              } else if(type == 'TXQSF'){
                this.retirementStatusList = data && data.code === 0 ? data.list : [];
              } else if(type == 'BRZT'){
                this.myStatusList = data && data.code === 0 ? data.list : [];
              } else if(type == 'YBD'){
                this.originalTroopsList = data && data.code === 0 ? data.list : [];
              } else if(type == 'AREA'){
                this.countyList = data && data.code === 0 ? data.list : [];
              } else if(type == 'RYFL'){
                this.personTypeList = data && data.code === 0 ? data.list : [];
              }
                  
                  
            })
      },
      groupFormate(row) {
				let death = '';
				this.typeOptions.forEach(item => {
					if (row.death == item.code) {
						death = item.value;
					}
				});
				return death;

      },

      //地区联动专用
      dataArea(val,type){
     
         this.$http({
            url: this.$http.adornUrl("/sys/dict/select/"+type),
            method: "get",
            params: this.$http.adornParams(),
            })
            .then(({ data }) => {
                if (type == "AREA") {
                  this.countyList = data && data.code === 0 ? data.list : [];
                } else if (type == "TXQSF") {
                  this.retirementStatusList = data && data.code === 0 ? data.list : [];
                }  
                this.$http({
                  url: this.$http.adornUrl("/sys/dict/secondary/"+val),
                  method: "get",
                  params: this.$http.adornParams(),
                  }).then(({ data }) => {                 
                      if (type == "AREA") {
                      this.dataForm.street = null;
                      this.streetList = data && data.code === 0 ? data.list : [];
                    } else if (type == "TXQSF") {
                      this.dataForm.duties = null;
                      this.dutiesList = data && data.code === 0 ? data.list : [];        
                    }
                     
                  })
            })
      },
      filterMethod(query){
            if(query === '' || query===undefined){
               
            }
            else{
                this.$http({
                  url: this.$http.adornUrl("/jxxm/retiredemployees/name/"+query),
                  method: "get",
                  params: this.$http.adornParams(),
                  })
                  .then(({ data }) => {
                      this.nameList = data && data.code === 0 ? data.list : []; 
                  })
            }
        }
    }
  }
</script>
